import request from "../utils/request";

const api_name = '/course'

export default {
    // 获取首页中的讲师和课程数据
    getIndexData() {
        return request({
            url: `${api_name}/indexdata`,
            method: 'get'
        })
    },
    // 分页获取课程列表数据
    getPagedList(page, limit, searchObj) {
        return request({
            url: `${api_name}/search/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    // 获取课程详情数据
    getCourseDetail(id) {
        return request({
            url: `${api_name}/detail/${id}`,
            method: 'get'
        })
    }
}